      SUBROUTINE SETUP
      RETURN
      END
C   HS81
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS81'/
      DATA (X(I),I=1,5)/-2.0D0,2*2.0D0,2*-1.D0/
      DATA N/5/ , NH/3/ , NG/10/
      DATA DEL0/.10D0/ ,TAU0/1.00D0/ ,TAU/.1D0/
      DATA (GUNIT(1,J),J=4,13)/10*1/,(GUNIT(3,I),I=4,13)/5*1,5*-1/,
     F     (GUNIT(2,I),I=4,13)/1,2,3,4,5,
     F     1,2,3,4,5/
     F     ,((GUNIT(I,J),I=1,3),J=0,3)/-1,0,0,-1,0,0,-1,0,0,-1,0,0/
      END
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),FX
      ICF=ICF+1
      FX=DEXP (X(1)*X(2)*X(3)*X(4)*X(5))-.5D0*(X(1)**3+X(2)**3+1.D0)**2
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),GRADF(NX),XKLA,TERM
      ICGF=ICGF+1
      XKLA=X(1)**3+X(2)**3+1.D0
      TERM=DEXP(X(1)*X(2)*X(3)*X(4)*X(5))
      GRADF(1)=X(2)*X(3)*X(4)*X(5)*TERM-3.D0*X(1)**2*XKLA
      GRADF(2)=X(1)*X(3)*X(4)*X(5)*TERM-3.D0*X(2)**2*XKLA
      GRADF(3)=X(1)*X(2)*X(4)*X(5)*TERM
      GRADF(4)=X(1)*X(2)*X(3)*X(5)*TERM
      GRADF(5)=X(1)*X(2)*X(3)*X(4)*TERM
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      GOTO (100,200,300),I
  100 CONTINUE
      HXI=X(1)**2+X(2)**2+X(3)**2+X(4)**2+X(5)**2-10.D0
      RETURN
  200 CONTINUE
      HXI=X(2)*X(3)-5.D0*X(4)*X(5)
      RETURN
  300 CONTINUE
      HXI=X(1)**3+X(2)**3+1.D0
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J
      DOUBLE PRECISION X(NX),GRADHI(NX)
      CGRES(I)=CGRES(I)+1
      GOTO(100,300,400),I
  100 CONTINUE
      DO      200      J=1,5
      GRADHI(J)=2.D0*X(J)
  200 CONTINUE
      RETURN
  300 CONTINUE
      GRADHI(1)=0.D0
      GRADHI(2)=X(3)
      GRADHI(3)=X(2)
      GRADHI(4)=-5.D0*X(5)
      GRADHI(5)=-5.D0*X(4)
      RETURN
  400 CONTINUE
      GRADHI(1)= 3.D0*X(1)**2
      GRADHI(2)= 3.D0*X(2)**2
      DO      500      J=1,3
      GRADHI(J+2)=0.D0
  500 CONTINUE
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),UG(5),OG(5),GXI
      SAVE UG,OG
      DATA UG/2*-2.3D0,3*-3.2D0/,OG/2*2.3D0,3*3.2D0/
      IF ( GUNIT(1,I+NH) .EQ. -1 ) CRES(I+NH)=CRES(I+NH)+1
       IF(I .GT. 5)      GOTO 100
       GXI=X(I)-UG(I)
       RETURN
  100  CONTINUE
      GXI=OG(I-5)-X(I-5)
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J
      DOUBLE PRECISION X(NX) ,GRADGI(NX)
      DO      100      J=1,5
      GRADGI(J)=0.D0
  100 CONTINUE
      IF(I .LE. 5)    GRADGI(I)=1.D0
      IF(I .GT. 5)    GRADGI(I-5)=-1.D0
      RETURN
      END


